<!DOCTYPE html>
<html>
<head>
    <meta name="layout" content="main" />
    <g:set var="entityName" value="${message(code: 'accountFlow.label', default: 'accountFlow')}" />
    <title>工作流</title>
</head>
<body>
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>CINDATA PLS</li>
                    <li>
                        <g:link class="list" action="index">工作流</g:link>
                    </li>
                    <li class="active">
                        <span>新增工作流</span>
                    </li>
                </ol>
            </div>
            <h2 class="font-light m-b-xs">
                工作流
            </h2>
        </div>
    </div>
</div>
<div class="content animate-panel">
    <div class="row">
        <div class="hpanel hblue">
            <div class="panel-heading">
                新增工作流
            </div>
            <g:if test="${flash.message}">
                <div class="message" role="status">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${this.accountFlow}">
                <ul class="errors" role="alert">
                    <g:eachError bean="${this.accountFlow}" var="error">
                        <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                    </g:eachError>
                </ul>
            </g:hasErrors>
            <div class="panel-body">
                <g:form action="save" class="form-horizontal">
                    <div class="form-group">
                        <label class="col-md-3 control-label">名称</label>
                        <div class="col-md-3">
                            <input type="hidden" name="account" value="${params.account}">
                            <input type="hidden" name="targetUri" value="${params.targetUri}">
                            <g:select class="form-control" name="workflow.id"  id="workflow" value="${this.accountFlow?.workflow}" from="${com.cindata.Workflow.findAllByActive(true)}" optionKey="id" optionValue="name" noSelection="${['null':'请选择']}"></g:select>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-md-3 control-label">类型</label>
                        <div class="col-md-3">
                            <g:select class="form-control" name="type.id"  id="type" value="${this.accountFlow?.type}" from="${com.cindata.dictionary.CollateralType.list()}" optionKey="id" optionValue="name" noSelection="${['null':'请选择']}"></g:select>
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>

                    <div class="form-group">
                        <div class="col-md-3 col-md-offset-3">
                            <g:submitButton class="btn btn-info" name="save" value="保存" />
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>

</body>
</html>
